import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component:()=>import('@/views/HomeView.vue'),
  },
  {
    path: '/home',
    name: 'home',
    component:()=>import('@/views/HomeView.vue'),
  },
  {
    path: '/classify/:type',
    name: 'classify',
    component:()=>import('@/views/ClassifyView.vue'),
  },
  {
    path: '/shoppingcar',
    name: 'shoppingcar',
    component:()=>import('@/views/ShoppingCar.vue'),
  },
  {
    path: '/mine',
    name: 'mine',
    component:()=>import('@/views/MineView.vue'),
  },
  {
    path: '/login',
    name: 'login',
    component:()=>import('@/components/LoginView.vue'),
  },
  {
    path: '/register',
    name: 'register',
    component:()=>import('@/components/RegisterView.vue'),
  },
  {
    path: '/detail/:id',
    name: 'detail',
    component:()=>import('@/views/DeatilView.vue'),
  },
]

const router = new VueRouter({
  routes
})

export default router
